pro iplotmousetool, data, ptr_seeds, ptr_rays, numrays, _REF_EXTRA = _extra, identifier = identifier

nparams = n_params()
if(nparams GT 0) then begin
	oparmset = obj_new('IDLitParameterSet')
	if (n_elements(data) gt 0) then begin
		oparmset->add, obj_new('IDLitDataIDLVector', data[0,*], NAME='X'), parameter_name='X'
		oparmset->add, obj_new('IDLitDataIDLVector', data[1,*], NAME='Y'), parameter_name='Y'
	endif
endif
	itregister, 'Plot Mouse Tool', 'iplotmousetool'

	identifier = IDLitSys_CreateTool('Plot Mouse Tool', NAME = 'Plot Mouse Tool', VISUALIZATION_TYPE = ['PLOT'], $
			INITIAL_DATA = oparmset, _EXTRA = _extra, TITLE = 'Plot Mouse Tool', LINESTYLE=6, SYM_INDEX=3)

	ods = currentds(identifier)

	ods->SetProperty, UVALUE={pseeds:ptr_seeds, prays:ptr_rays, nrays:numrays}

	tid = itGetCurrent(tool=otool)
	omanip = otool->getByIdentifier("MANIPULATORS/SCATTER PLOT POINT INTEREGATOR")
	omanip->SetProperty, UVALUE={pseeds:ptr_seeds, prays:ptr_rays, nrays:numrays}
	oprmanip = otool->getByIdentifier("MANIPULATORS/IMAGE PROFILER")

end